<%@page import="com.liferay.portal.kernel.util.GetterUtil"%>
<%@include file="/WEB-INF/jsp/init.jsp"%>

This page is for editing preferences during run time.

<%PortletURL setCapacityURL = renderResponse.createActionURL();
			setCapacityURL.setParameter("action","setCapacity");
			int maxCapacity = GetterUtil.getInteger(portletPreferences
					.getValue("library_capacity", ""));%>

<aui:form action="<%=setCapacityURL.toString()%>" method="POST">
	<aui:input name="library_capacity" label="Max Capacity of the Library"
		value="<%=maxCapacity%>" />
	<aui:button type="submit" value="Set Preferences" />
</aui:form>

<h2>
	The maximum capacity of this library is:
	<%=portletPreferences.getValue("library_capacity", "")%>
</h2>